from selenium import webdriver
from selenium.webdriver.common.by import By
import time

driver=webdriver.Chrome()
driver.get('https://www.baidu.com')


kw=driver.find_element(By.XPATH,'//input[@id="kw"]')
print(kw.get_attribute('outerHTML'))

wd=driver.find_element(By.XPATH,'//input[@name="wd"]')
print(wd.get_attribute('outerHTML'))


inputs=driver.find_elements(By.XPATH,'//input')
for i in inputs:
    print(i.get_attribute('outerHTML'))


time.sleep(3)
driver.quit()


